NovelAI Diffusion
novelAIの画像生成AIサービス
NovelAI Diffusion is a tool designed for visual storytelling without any limitations.
Image Generation on NovelAI with our own custom NovelAI Diffusion Models, based on Stable Diffusion
3種類ある
https://docs.novelai.net/
https://twitter.com/novelaiofficial/status/1583688206192500736?s=20
https://twitter.com/novelaiofficial/status/1583688210668204034?s=20
fine tuningした話
/nishio/画像生成AI勉強会(2022年10月ダイジェスト)#636da8e2aff09e00005b3e37
NovelAI Improvements on Stable Diffusion | by NovelAI | Oct, 2022 | Medium
CLIPの最後から二番目のlayerの隠れ状態をguidanceに使う
理論的な背景は予備知識がなくて理解できない基素.icon
不自然なクロップ
512x512が基本
超えると繰り返しが起こる傾向がある
直せないからデータセットにカスタムバッチ生成を実装した
aspect ratio bucketingを実施
他には固定サイズの画像に収まるようにスケーリングさせる方法もあるスケーリングさせる方法もあるが無駄な計算が発生するので不採用
SDは75トークンだけどこれを3倍にした
Hypernetworks
Stable diffusionの開発初期にモデルにアクセスしていた
モデル出力をコントロールするためのモジュールの埋め込みをやったが汎化性能が低かった
Aero was able to come up with one that is both performant and achieves high accuracy with varied dataset sizes. The hypernets are applied to the k and v vectors of CrossAttention layers in StableDiffusion, while not touching any other parts of the U-net. We found that the shallow attention layers overfit quickly with this approach, so we penalize those layers during training. This mostly mitigated the overfitting issue and results in better generalization at the end of training.
Aeroはパフォーマンスと、様々なデータセットサイズで高い精度を達成するものを考え出すことができました。ハイパーネットはStableDiffusionのCrossAttention層のkとvのベクトルに適用され、U-netの他の部分には触れないようにしています。このアプローチでは浅いattention層がすぐにoverfittingすることが分かったので、学習中にそれらの層にペナルティを課します。これにより、オーバーフィッティングの問題はほぼ緩和され、トレーニングの最後にはより良い汎化が得られるようになりました。
The approach performs especially well over fine-tuning when data on the target concept is limited. We believe this is because the original model is preserved, and the hypernets can find sparse areas of the latent space to match the data. While fine-tuning on similar small datasets causes the model to lose generalization quality as it tries to fit the few training examples.
このアプローチは、対象概念に関するデータが限られている場合、fine tuningよりも特に優れた性能を発揮する。これは、元のモデルが保持され、ハイパーネットがデータに適合する潜在空間の疎な領域を見つけることができるからであると考えられる。一方、類似の小さなデータセットで微調整を行うと、少数の学習例に合わせようとするため、モデルの汎化品質が低下する。
Diffusion Model Hypernetworksのレイヤー構造を変えた際の変化を比較する
/nishio/Hypernetwork
@novelaiofficial: デフォルトの画像生成の品質を向上させるために、Add Quality Tags(画質タグを追加)の設定を有効/無効にできるボタンを追加しました。有効にされた場合、再度設定を無効にしない限り、すべてのプロンプトのテキストの先頭に「masterpiece, best quality, 」が自動的に追加されます。
https://pbs.twimg.com/media/FeaYIdBXgAo2mVm.png
2022年9月25日
@novelaiofficial: #NovelAI Image Generation Progress Showcase:
When you include tags in your prompts, you may produce more of the same character with greater consistency!
https://pbs.twimg.com/media/FddgYndXkAIszNh.jpg
@novelaiofficial: 1girl, masterpiece, virtual youtuber, bangs, long bangs, hair between eyes, blonde hair, medium hair, aqua eyes, tomboy, muscular female, bulletproof vest, tanktop, camouflage pants
https://pbs.twimg.com/media/FddgdNGXEAA9CIA.png
@novelaiofficial: @NilaierMusic Since we are training on Danbooru, it also learns character names and their visuals. You can prompt for "masterpiece portrait of smiling rem, re zero, caustics, textile shading, high resolution illustration" and get this:
https://pbs.twimg.com/media/FddpLkBXwAIEuu9.pnghttps://pbs.twimg.com/media/FddpLkcXoAAkSkX.png
同じくdanbooruを元ソースにしているものにはWaifu diffusionがある
2022/10/03 Twitterでバズる
キャラクター絵に特化していてキャラ絵が出しやすそう
キャラ絵は関心が高く、バズりやすい
作例
@p1atdev_art: VTuberっぽい立ち絵を生成する呪文テンプレートです
呪文は一枚目のALTに、推奨生成パラメータはリプにあります
テンプレートでは詳細な見た目の設定をしていないので、各自で髪型や色、服装を指定してください
#novelAI #NAIDiffusion #NovelAIDiffusion
https://pbs.twimg.com/media/FeYm2S3UUAAx52o.jpghttps://pbs.twimg.com/media/FeYmh8vUcAIg5j0.jpghttps://pbs.twimg.com/media/FeYopr1VQAA5BBi.pnghttps://pbs.twimg.com/media/FeYoqc8UAAIf-b5.png
@den2_nova: 公式プロンプトの『{{masterpiece}}, official art, long legs, tall, colossal, gigantic』でマジで簡単に巨女が出るな……
https://pbs.twimg.com/media/FeHx7ASUcAALyi3.jpg
image to image
@ZporigonZ: #novelAI これすげぇなぁ…もうなんでも出来るやん…
NovelAIで漫画を描く
https://pbs.twimg.com/media/FeMbelFaAAAcN6q.jpghttps://pbs.twimg.com/media/FeMbelDaMAUHJm2.jpg
@8co28: 『ネームがあったらAIで漫画は描けるのか』考察
3枚目を指示画像に
https://pbs.twimg.com/media/FeMMrhFaUAAPg4j.jpg
Strength:0.75 文字指定は「pixiv, girl, dinamic pose, manga, white and black, comic,」
2枚目が生成されたので最低限の加筆修正写植して
https://pbs.twimg.com/media/FeMMp9SaUAEFfBd.png
1枚目に
絵が描けなくても漫画を発表できるようになる時代だ
https://pbs.twimg.com/media/FeMMoo0aEAEFUBW.png
@G03MIAq1YTrRVOR: NovelAI使ってみたけど、ホントに凄いな……
可愛すぎて幼女ばっか作ってしまった
https://pbs.twimg.com/media/FeKNaTbacAAbsZT.pnghttps://pbs.twimg.com/media/FeKNlYDakAAPTOC.pnghttps://pbs.twimg.com/media/FeKNv3saUAAnhkz.pnghttps://pbs.twimg.com/media/FeKN0epagAAc9_D.png
@imos: 「NovelAIがdanbooruの画像を切り貼りして生成している」というのは勘違いで、主にタグを学習しただけで画像はStable Diffusion由来というのが実態だと思う。なのでアニメ外の世界(Danbooruにない概念)もtext2imgでガンガン生成できる。Googleplexのイラストなんて描く人いないと思うけど描ける。
https://pbs.twimg.com/media/FeduL1fUoAAkXqq.pnghttps://pbs.twimg.com/media/FeduNcBVQAAwM4m.pnghttps://pbs.twimg.com/media/FeduPOBVUAA7F7x.pnghttps://pbs.twimg.com/media/FeduRoxUcAAXQ4Y.png
@imos: たった今の技術ではDanbooruに存在する画像数でこの品質を生成するのは難しいというのも別の理由。なのでアニメ調の画風変換を獲得した上で(キャラクターなどの)新たな概念はすでにStable Diffusionに存在する概念の組み合わせとして獲得するような実装になっていると考えるのがおそらく自然。
動画フレームのimage to image
特性
@kuronagirai: NovelAIで大体400枚ほど出して試した感想だけど
どうにも構図関連が他のAIにより弱い?
キャラ再現精度を上げるために意図的に変なポーズをカットしてるのかもしれない
作品として仕上げるにはポーズ呪文に力を入れる必要があるかも
ただStableDiffusionと呪文互換性は低い?
https://twitter.com/den2_nova/status/1576797569480474625?s=20&t=NIb47h0VxeV_7nv73bx_uA
使い方